﻿using App.IRepository;
using App.IService;
using App.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App.Service
{
    public class ArticleService : BaseService<Article>, IArticleService
    {
        private readonly IArticleRepository _iArticleRepository;
        public ArticleService(IArticleRepository iArticleRepository)
        {
            _iArticleRepository = iArticleRepository;
            base._iBaseRepository = iArticleRepository;
        }
        public async Task<bool> SetTopAsync(string id, bool isTop)
        {
            return await _iArticleRepository.SetTopAsync(id, isTop);
        }
        public async Task<bool> SoftDeleteAsync(string id)
        {
            return await _iArticleRepository.SoftDeleteAsync(id);
        }
        public async Task<bool> RestoreAsync(string id)
        {
            return await _iArticleRepository.RestoreAsync(id);
        }

    }
}
